1. Field of the Invention
The present invention relates to an image recognition apparatus, method and program product that have a capability of maintaining the original layout when character code data, which are obtained by recognizing character codes from character images included in input image data, are disposed using a particular font.
2. Description of the Related Art
The image recognition apparatus is to analyze image data inputted by scanning an original document by a scanner and the like, extracting each region that contains character images, photograph images or diagram images by each attribute, and conducting recognition process on each region according to its attribute.
In recent years, image recognition apparatuses, having a capability not only to output character code data obtained by recognizing character codes from character images but also to output them maintaining the original document's layout, have been proposed.
For example, an image recognition apparatus is known, which is capable of recognizing from character images font sizes, font types, styles (bold, italics, etc.) and maintaining the original document's layout by outputting character code data including these attributes of characters.
Another image recognition apparatus is also known, which is capable of embedding photographic and diagram images as bit map data into output image data, or recognizing page formats to make it possible to describe them in terms of layout frame styles, so that various styles of files can be prepared.
However, those image recognition apparatuses can recognize only a limited level of font types as character attributes from character images. Moreover, since numerous types of fonts are used on actual documents, it is not realistic to recognize all fonts. Moreover, even if all fonts are accurately recognized and the recognized font is specified and outputted, it is not possible to receive the data with accurate fonts unless the data receiving side is prepared with such fonts.
Therefore, numerous types of fonts existing on original documents (hereinafter “input fonts”) have no choice but to be reduced to a limited number of general fonts that are used for outputting character code data (hereinafter “output fonts”).
Consequently, it is often impossible to output character code data to have the same character layout as in the original document considering the fact that the width and height of a character vary with the type of a font used when the character code obtained from a character image is outputted in a specific output font.
It is therefore difficult to deal with large varieties of documents even if those image recognition apparatuses mentioned above are equipped with capabilities to maintain document layouts. More specifically, there are problems as described below depending on the fonts and layouts of texts and graphics on an original document, when character code data obtained by recognizing them from character images are outputted in specific output fonts.
For example, if the character width of an output font is greater than the character width of an input font, the character image outputted based on the character code data in the output font may not fit within the character region in the image data obtained by scanning the document, where the character image exists. This causes a problem such that characters and photographs overlap each other, or characters overlap each other on the output image. In some cases, the number of text lines increases in the process, so that the result of scanning one page may result in two pages of output image. On the other hand, when a process of separating a text from a photograph is performed, the photograph may get outputted on a separate page.